

package Clases;

import java.io.Serializable;
import java.sql.Date;
import java.util.List;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.JoinTable;
import javax.persistence.ManyToMany;
import javax.persistence.PrimaryKeyJoinColumn;


@Entity
@PrimaryKeyJoinColumn(name="Persona_id")
public class Actor extends Persona  implements Serializable{
    private List movies;

    public Actor(int id, String name, String lastname, Date birthDate, String placeBirth, String picture, String imagen) {
    }

    public Actor() {
    }

    @ManyToMany
    @JoinTable(name="movie", joinColumns={ @JoinColumn(name="actor_id", nullable=false)},
    inverseJoinColumns={@JoinColumn(name="movie_id", nullable=false)}
)
    public List getMovies(){ return this.movies; }

}



